#include "ObjectPool.h"

void test()
{
	std::vector<TreeNode*> v;
	ObjectPool<TreeNode> op;
	for (int i = 0; i < 100000; ++i)
	{
		v.push_back(op.New());
	}
	for (int i = 0; i < 100000; ++i)
	{
		op.Delete(v[i]);
	}
}

int main()
{
	try 
	{
		TestObjectPool();
	}
	catch (const std::exception& e)
	{
		std::cout << e.what() << std::endl;
	}
	return 0;
}